<p>Base Assumptions: The Complex Electoral Geography of Stateside US Military Installations</p>
<p>Danielle L. Lupton, Colgate University, USA</p>
<p>Jeremy M. Teigen, Ramapo College of New Jersey, USA</p>
<p>Replication Explainer (&ldquo;README&rdquo;)</p>
<p>This study uses a complex array of individual and county-level data.</p>
<hr />
<p><strong>County-level test of the &ldquo;military bastion&rdquo; theory:</strong></p>
<p>The Stata script &ldquo;testing county level military bastion.do&rdquo; relies on 2022 American Community Survey (ACS) data available at <a href="https://www2.census.gov/programs-surveys/popest/datasets/2020-2022/counties/asrh/">https://www2.census.gov/programs-surveys/popest/datasets/2020-2022/counties/asrh/</a> and the county level vote tallies of Joe Biden and Donald Trump in 2020.</p>
<p>First, fix the pathname on line six to accord with your file structure and OS circumstances. The folder that pathname points to should contain the ACS file and the election data. The assumed file names are &ldquo;cc-est2022-all.csv&rdquo; and &ldquo;countypres_2000-2020.csv&rdquo;</p>
<p>The county-level analysis script relies only upon &ldquo;stock&rdquo; Stata commands; no ADOs needed. The script runs a difference of means test and creates a bar graph to visualize, but neither is included in the manuscript nor the appendix.</p>
<hr />
<p><strong>Individual-level analysis for creating figures in the manuscript and the tables in the appendix:</strong></p>
<p>There are four scripts that each perform different parts of the analysis, not all of which appears in the manuscript or appendix: A harvest each cross section to compile a pooled cross section file with recodes and geographic work script, a main analysis script, and two sixty-mile-circle analysis scripts, each with a different dependent variable.</p>
<hr />
<p><strong>The first (&ldquo;pool-recode-savedata script&rdquo;)</strong></p>
<p>It compiles the 2006 through 2022 Cooperative Election Study (&ldquo;CES&rdquo;) cross sections by opening each, creating common variable names, recodes for analytic simplicity, pares the variable list down to the essentials, and saves each pruned and recoded cross section to a &ldquo;working&rdquo; folder. Then, just like the Avengers, it assembles all the cross-sections into a pooled cross section file and then does an array of recodes and labelling of variables and their values. Next it geocodes each respondent to the centroid of their zip code&rsquo;s latitude and longitude and matches respondents to their zip codes demographics and population density. Next, the script calculates the distance from each respondent to every military installation. Lastly, it does some rounding, makes some checksum summary tables, and saves the file (&ldquo;ces06-22data_recoded.dta&rdquo;).</p>
<p>Replicators will need to amend lines 33 and 34 to accord with their particulars regarding OS and pathnames and create two folders, &ldquo;replicate_bases&rdquo; with a subfolder called &ldquo;replicate_bases_cces_work&rdquo;. The first main folder should contain all the CES cross sections using the filenames from CES&rsquo;s <a href="https://cces.gov.harvard.edu/data">dataverse</a>, the convert-zip-code-to-latitude-and-longitude file (&ldquo;zipcode_latlong.dta&rdquo;), the zip-code-demographics file (&ldquo;zipdemographicdata.dta&rdquo;), and the zip-code-population-density file (&ldquo;simplemapdotcomdata_pared.dta&rdquo;). This script assumes Stata has Robert Picard&rsquo;s &ldquo;geodist&rdquo; ADO installed for calculating distance between pairs of latitude/longitude data. Enter the command &ldquo;ssc install geodist&rdquo; if your Stata lacks this ADO.</p>
<hr />
<p><strong>The second (&ldquo;lupton_teigen_replication_main.do&rdquo;)</strong></p>
<p>We think of this one as the main replication file as it does the main analysis. It runs the &ldquo;closest military base&rdquo; and the &ldquo;total proximity&rdquo; models (appendix table 3) and creates the figures for the manuscript and tables for the appendix. Replicators will need to adjust the pathnames on lines 13 and 14 to their machine&rsquo;s specifics. The first locates the file created by the &ldquo;pool-recode-savedata script.do&rdquo; file while the second points to a folder to hold new output. This script assumes Stata has Roy Wada&rsquo;s &ldquo;outreg2&rdquo; ADO installed for exporting regression results. Enter the command &ldquo;ssc install outreg2&rdquo; if your Stata lacks this ADO.</p>
<hr />
<p><strong>The third and fourth (&ldquo;sixty-mile-party-identification-replicate&rdquo; and &ldquo;sixty-mile-vote-choice-replicate&rdquo;)</strong></p>
<p>Both of these replication scripts are more or less the same thing, they just have different dependent variables. For each military base, we isolate the same sort of analysis that transpires in the second script except it only uses cases that are within a sixty-mile radius circle around the base. Replicators will have to adjust the pathnames found on lines 11 and 20. Eleven designates a location for the output table to be created and 20 locates the file created by the &ldquo;pool-recode-savedata script.do&rdquo; Ditto for &ldquo;outreg2&rdquo; ADO as the main script.</p>
<p>Both 60-mile scripts create very large tables of regression results as Microsoft Excel files as well as post-estimation plots of predicted probabilities. Replicators may notice that some bases&rsquo; models are omitted or run with few controls; this was done for bases in sparely populated areas who might only have dozens of respondents in the sixty-mile circle. Manuscript figures 2 &amp; 3 are created in these scripts (though most others are not included in the manuscript nor the appendix).</p>
<p>Appendix table 2 summarizes a subset of these models, those that exhibited any statistical significance for the independent variable of interest. Including a complete table of all the parameter estimates from all the sixty-mile circles would create a table too large even for the appendix, so we&rsquo;ve included them as separate grids of results, available as two tabs in a Microsoft Excel file named &ldquo;Full Results 60 Mile Circles.xlsx&rdquo; We uploaded our Excel file to the Dataverse for comparison but replicators can make their own with the these two scripts.</p>